package com.cvit.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cvit.model.Msg;
import com.cvit.model.Region;
import com.cvit.service.RegionService;

@Controller
public class RegionController {
	@Autowired
	RegionService regionService;
	/**
	 * 按照pid查询*/
	@ResponseBody
	@RequestMapping("/getpid")
	public Msg getRegion(@RequestParam("pid") String pid){
		List<Region> region=regionService.getReg(pid);
		return Msg.success().add("region", region);
		
	}
}
